<html>
<head>
<style type='text/css'>
body {
   background-color: white;
   margin: 1em 2em 1em 2em;
   font-family: Sans-Serif;
   color: #002;
   line-height: 140%;
   font-size: 12px;
}

h1 {
    font-size: 140%;
}

h2 {
    font-size: 130%;
}

h3 {
    font-size: 120%;
}

h4 {
    font-size: 100%;
    font-style: normal;
    font-weight: bold;
}

h5 {
    font-size: 100%;
    font-style: italic;
    font-weight: normal;
}

pre {
   background-color: #eee;
   padding: 0.5em 0.5em 0.5em 2em;
}

@media print {
   pre {word-wrap:break-word; width:100%;}
} 

ul li,
ol li {
   padding-left: 0.3em;
   /*text-indent: -2em;*/
   margin-bottom: 0.5em;
}

em {
   font-style: normal;
   font-weight: bold;
   text-decoration: underline;
   color: #c40;
}

code {
   font-family: Monospace;
   font-size: 100%;
   color: #c40;
}

a, a * {
   text-decoration: underline;
   color: #14a0d1;
   /* border: 0.5px solid #aaa;
   white-space: nowrap;
   padding-right: 0.1em;
   padding-left: 0.1em;
   padding-bottom: -5px; */
}

a code {
   color: #14a0d1;
}

img {
   position: relative;
   bottom: -4px;
}

div.headline {
   font-weight: bold;
   font-size: 110%;
}

div.copyright {
   margin-top: 1em;
   border-top: 1px solid black;
   padding-top: 0.5em;
}

div.iris_headline {
   border-bottom: 1px solid black;
   padding-bottom: 0.3em;
}

.LaTeX {
   font-family: Monospace;
   font-size: 100%;
   border: 1px solid #060;
   color: #060;
}

code.LaTeX {
   background-color: white;
   padding: 0.5em 0.5em 0.5em 2em;
}
</style>
</head>

<body>
<div class="iris_headline">IRIS Toolbox Reference Manual</div>




<h2 id="dates/textinp2dat">textinp2dat</h2>
<div class="headline">Convert text input to IRIS serial date numbers</div>

<h4 id="syntax">Syntax</h4>
<pre><code>Dat = textinp2dat(Str)</code></pre>
<h4 id="input-arguments">Input arguments</h4>
<ul>
<li><code>Str</code> [ char ] - String describing a date, a vector of dates, or a range; see Description.</li>
</ul>
<h4 id="output-arguments">Output arguments</h4>
<ul>
<li><code>Dat</code> [ numeric ] - IRIS serial date numbers representing the input date, vector of dates, or range.</li>
</ul>
<h4 id="description">Description</h4>
<p>Input text strings can contain dates in the basic format, for instance <code>2010Y</code> for yearly dates, <code>2010H1</code> for half-yearly dates, <code>2010Q2</code> for quarterly dates, <code>2010B6</code> for bi-monthly dates, <code>2010M09</code> for monthly dates, <code>2010W52</code> for weekly dates, or <code>2010-May-30</code> for daily dates. Each occurrence of a date will be replaced with a call to the respective IRIS date function, <code>yy(...)</code>, <code>hh(...)</code>, <code>qq(...)</code>, <code>bb(...)</code>, <code>mm(...)</code>, <code>ww(...)</code>, or <code>dd(...)</code>, and the resulting expression will be evaluated, converting it into a vector of IRIS serial date numbers.</p>
<h4 id="example">Example</h4>
<pre><code>&gt;&gt; textinp2dat(&#39;2010Q1:2011Q4&#39;)
ans =
   1.0e+03 *
    Columns 1 through 7
    8.0400    8.0410    8.0420    8.0430    8.0440    8.0450    8.0460
    Column 8
    8.0470
&gt;&gt; dat2str( textinp2dat(&#39;2010Q1:2011Q4&#39;) )
ans =
    Columns 1 through 6
    &#39;2010Q1&#39;    &#39;2010Q2&#39;    &#39;2010Q3&#39;    &#39;2010Q4&#39;    &#39;2011Q1&#39;    &#39;2011Q2&#39;
    Columns 7 through 8
    &#39;2011Q3&#39;    &#39;2011Q4&#39;</code></pre>

</body>
<div class="copyright">IRIS Toolbox. Copyright &copy; 2007-2015 IRIS Solutions Team.</div>
</html>
